package com.hotline.communication.enums;

import lombok.Getter;
import org.springframework.util.StringUtils;

public enum ParamEnum {

    //-------------------------------通讯相关参数-----------------------------
    TX_MAIN_MCP_CSS("1010","主MCP/CCS地址"),
    TX_BACK_MCP_CSS("1011","备MCP/CCS地址"),
    TX_CALL_CENTER_NO("1012","呼叫中心编号"),
    TX_VDN_NO("1013","VDN编号"),
    TX_RECORD_FILE_SERVER_IP("1014","录音服务器地址"),
    TX_AUTO_ANSWER("1015","是否自动应答"),
    TX_CALL_OUT_PREFIX("1016","外呼设置"),
    TX_SHOW_CALLER_AREA("1017","是否显示来电号码属地"),
    TX_SIGN_IN_BUSY("1018","是否签入示忙"),
    TX_HAVE_IDLE("1019","通话结束是否存在整理态"),
    TX_IVR_CODE("1020","IVR接入码"),
    TX_MONITOR_WORK_NO("1021","座席状态监控工号"),
    TX_ACW_AUTO_IDLE("1022","整理态自动示闲"),
    TX_ACW_AUTO_IDLE_SECONDS("1023","整理态自动示闲时长"),
    TX_TRANSFER_TYPE("1024","呼转设置"),
    TX_AUTO_GET_HOLD("1025","自动结束保持"),
    TX_AUTO_GET_HOLD_SECONDS("1026","自动结束保持时长"),
    TX_AUTO_END_REST("1027","自动结束休息"),
    TX_AUTO_END_REST_SECONDS("1028","自动结束休息时长"),
    TX_MONITOR_AGENT_ALERT_SECONDS("1029","坐席监控超时提醒时长"),
    TX_SHOW_CALLED_NO("1030","来电受理是否显示被叫号码"),
    TX_AGENT_BUSY_MAX_COUNT("1031","坐席最大示忙数"),
    TX_AGENT_REST_MAX_COUNT("1032","坐席最大休息数"),
    TX_AWC_TIMEOUT_ALERT("1033","整理态超时提醒"),
    TX_AWC_TIMEOUT_ALTER_SECONDS("1034","整理态超时时长"),
    TX_BUSY_TIMEOUT_ALERT("1035","示忙状态超时提醒"),
    TX_BUSY_TIMEOUT_ALTER_SECONDS("1036","示忙状态超时时长"),
    TX_REST_TIMEOUT_ALERT("1037","休息状态超时提醒"),
    TX_REST_TIMEOUT_ALTER_SECONDS("1038","休息状态超时时长"),
    TX_REGISTRATION_COMPLETED_ENTER_IDLE("1039","保存小结后坐席是否进入空闲状态"),
    TX_SKILL_QUEUE_THRESHOLD("1040","当前排队数预警值"),
    TX_CALLING_RECORD_INCLUDED_CALL_LOSS("1041","来电录音留言是否计入呼损记录"),
    TX_VIP_CALL_DATA("1042","VIP名单呼叫数据"),
    TX_SPECIAL_CALL_DATA("1043","特殊名单呼叫数据"),
    TX_BUSY_AUTO_IDLE("1044","示忙态自动示闲"),
    TX_BUSY_AUTO_IDLE_SECONDS("1045","示忙态自动示闲时长"),
    TX_AI_ENABLE("1046","是否启用智能"),
    TX_AI_SCENE("1047","智能场景呼叫数据"),
    TX_EVENT_CALL_BACK_URI("1048","事件回调地址"),
    TX_LONG_DISTANCE_CALL_PRIOR("1049","外地号码是否优先接听"),
    TX_PHONE_AREA_CODE("1050","电话区号"),
    TX_EQUIP_MODEL("1051","通讯设备型号"),
    TX_AGENT_PASSWORD("1052","坐席密码"),
    TX_WEBSOCKET_TYPE("1053","websocket类型"),
    TX_WEBSOCKET_ADDRESS("1054","websocket地址"),
    TX_WEBSOCKET_PORT("1055","websocket端口"),
    TX_EXTENSION_PORT("1056","分机注册端口"),
    TX_EXTENSION_PASSWORD("1057","分机密码"),
    TX_UNIFIED_PHONE("1058","一号对外"),
    TX_UNIFIED_PHONE_TRANSFER_DEFAULT_QUEUE("1059","是否转默认队列"),
    TX_NON_WORK_TIME_ENABLE_UNIFIED_PHONE("1060","非工作时间启用一号对外"),
    TX_PROVINCE_CENTER_PHONE_NUMBER("1061","省中心号码"),


    //---------------------------------系统相关参数----------------------------
    SYS_CALL_CENTER_MODE("2010","呼叫中心模式"),
    SYS_CALLER_NAME_ANON("2011","联系人姓名默认匿名"),
    SYS_QUERY_DATA_DAYS("2012","默认数据查询天数"),
    SYS_MAX_EXPORT_DATA_COUNT("2013","记录导出最大数量"),
    SYS_HOME_MODE("2014","首页模式"),
    SYS_ORDER_ASSIGN_MODE("2015","工单分派模式"),
    SYS_BACKLOG_REMIND("2016","待办事项提醒"),
    SYS_BACKLOG_REMIND_SECONDS("2017","待办事项提醒时间间隔"),
    SYS_ORDER_ASSIGN_OVERDUE_MINUTES("2018","工单流转逾期时限"),
    SYS_ORDER_PROCESSING_OVERDUE_MINUTES("2019","工单分派逾期时限"),
    SYS_ORDER_FINISH_OVERDUE_MINUTES("2020","工单办结逾期时限"),
    SYS_ORDER_ASSIGN_ENABLE("2021","工单流转"),
    SYS_ENABLE_ZSK("2022","启用知识库"),
    SYS_REG_CONTENT_SEARCH("2023","是否开启反映内容关键字搜索"),
    SYS_REG_RECORD_STANDING_BOOK_EXPORT("2024","是否开启台账导出"),
    SYS_REG_REPLY_CONTENT_SEARCH("2025","是否开启答复内容关键字搜索"),
    SYS_RECORD_ASSIGN_CHECK_TIME("2026","语音留言分派查询间隔时间"),
    SYS_REMINDER_QUEUE_NUM("2027","排队人数提醒阈值"),
    SYS_STA_CALLER_COUNT_LIMIT("2028","来电次数统计表显示行数"),
    SYS_ZSK_ALL("2029","知识库默认全库"),
    SYS_PASSWORD_ERROR_COUNT("2030", "密码错误允许次数"),
    SYS_USER_LOCK_MINUTES("2031", "密码超出错误次数账号锁定时长"),

    //---------------------------------短信相关参数----------------------------
    SMS_URL("3010", "接口地址"),
    SMS_SWITCH("3011", "是否启用短信"),
    SMS_IS_TEMPLATE("3012", "是否模板短信"),
    SMS_TASK_REMIND_TPL_ID("3013", "提醒任务短信模板ID"),
    SMS_TASK_REMIND_CONTENT("3014", "提醒任务短信内容"),
    SMS_AUDIT_SWITCH("3015", "是否开启审核流程"),
    SMS_SEND_TIME_MIN("3016", "发送时间最小时间"),
    SMS_SEND_TIME_MAX("3017", "发送时间最大时间"),
    SMS_SEND_TIME_AFTER_MINUTES("3018", "当日发送时间推后时间"),
    SMS_SIGNATURE("3019", "短信签名"),
    SMS_PER_CHARACTER_COUNT("3020", "每条短信字符数"),
    SMS_UNIT_PRICE("3021", "短信单价"),
    SMS_NO_ANSWER_ENABLE("3022","是否开启呼损自动发送短信"),
    SMS_NO_ANSWER_MSG_CONTENT("3023","呼损自动发送短信内容"),
    SMS_NO_ANSWER_SEND_INTERVAL("3024","呼损自动发送短信时间间隔"),

    //---------------------------------外呼相关参数----------------------------
    CALLOUT_PHONE_AREA_CODE("4010","电话区号"),
    CALLOUT_CALLER_NO("4011","外呼主叫号码"),
    CALLOUT_DEVICE_TYPE("4012","设备类型"),
    CALLOUT_DEVICE_SIGN("4013","设备名称"),
    CALLOUT_OUTBOUND_TYPE("4014","呼出方式"),
    CALLOUT_PREDICT_METHOD("4015","预测外呼算法"),
    CALLOUT_FORCE_CAST_TIME("4016","预测外呼预处理时间"),
    CALLOUT_PARAM1("4017","预测外呼参数1"),
    CALLOUT_PARAM2("4018","预测外呼参数2"),
    CALLOUT_PARAM3("4019","预测外呼参数3"),
    CALLOUT_PARAM4("4020","预测外呼参数4"),
    CALLOUT_PARAM5("4021","预测外呼参数5"),
    CALLOUT_PARAM6("4022","预测外呼参数6"),
    CALLOUT_MULTI_SKILL("4023","支持呼入呼出"),
    CALLOUT_CUSTOMER_IMPORT_MAX_COUNT("4024","任务名单导入最大数"),
    CALLOUT_TASK_TYPE("4025","支持外呼任务类型"),
    CALLOUT_TASK_ID("4026","转外线任务ID"),
    CALLOUT_TRANSFER_OUT_ANNOUNCE_ENABLE("4027","转外线是否开启提示音"),
    CALLOUT_TRANSFER_OUT_ANNOUNCE_PATH("4028","转外线提示音路径"),
    CALLOUT_CALL_INTERVAL("4029","拨打失败再次拨打间隔时间"),
    CALLOUT_CALL_MAX("4030","最多拨打次数"),
    CALLOUT_MAX_ALERTING_TIME("4031","用户不应答最大振铃时长"),
    CALLOUT_API_INTERVAL_TIME("4032","号码呼出时间间隔"),
    CALLOUT_API_MAX_TIMES("4033","号码最大呼出次数"),


    //---------------------------------绩效管理相关----------------------------
    PERFORMANCE_CALL_COUNT("5010","话务量总绩效"),
    PERFORMANCE_CALL_RATIO("5011","话务量绩效占比"),
    PERFORMANCE_CALL_BASE_RATIO("5012","话务基础绩效占比"),
    PERFORMANCE_CALL_WORK_TIME_RATIO("5013","工时绩效占比"),
    PERFORMANCE_SATISFACTION_RATIO("5014","满意度绩效占比"),
    PERFORMANCE_VERY_DISSATISFIED_DEPRIVE_NUM("5015","非常不满意扣发数"),


    //---------------------------------期限设置----------------------------
    PERIOD_BUSINESS_TYPE_CONSULT("6001","咨询办理期限","1"),
    PERIOD_BUSINESS_TYPE_QUERY("6002","查询办理期限","2"),
    PERIOD_BUSINESS_TYPE_COMPLAIN("6003","投诉办理期限","3"),
    PERIOD_BUSINESS_TYPE_ILLEGAL_DISCIPLINARY_REPORT("6004","违法违纪举报办理期限","4"),
    PERIOD_BUSINESS_TYPE_TAX_RELATED_REPORT("6005","涉税举报办理期限","5"),
    PERIOD_BUSINESS_TYPE_SUGGESTION("6006","意见建议办理期限","6"),
    PERIOD_BUSINESS_TYPE_CONSULT_QUERY("6010","咨询查询办理期限","10"),
    PERIOD_BUSINESS_TYPE_QUESTION_HANDLE("6011","问办结合办理期限","11"),
    PERIOD_BUSINESS_TYPE_TAX_RELATED_SOFTWARE("6012","涉税软件问题办理期限","12");

    /**
     * 编号
     */
    @Getter
    private String code;

    /**
     * 名称
     */
    @Getter
    private String name;


    /**
     * 拓展数据
     */
    @Getter
    private String extend;


    ParamEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

    ParamEnum(String code, String name, String extend) {
        this.code = code;
        this.name = name;
        this.extend = extend;
    }

    public static ParamEnum getParamEnum(String code){
        for (ParamEnum paramEnum : ParamEnum.values()){
            if(paramEnum.getCode().equals(code)){
                return paramEnum;
            }
        }
        return null;
    }

    public static ParamEnum getParamEnumByExtend(String extend){
        if(StringUtils.isEmpty(extend)){
            return null;
        }
        for (ParamEnum paramEnum : ParamEnum.values()){
            if(extend.equals(paramEnum.getExtend())){
                return paramEnum;
            }
        }
        return null;
    }
}
